/*
 * Created on Oct 22, 2003
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.vectrics.recruiter.job;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;

import org.apache.log4j.Logger;
import org.vectrics.common.db.JdbcTarget;
import org.vectrics.common.db.ProcessException;



public class FindJobSourcesJdbc implements JdbcTarget {
	private transient static Logger log = Logger.getLogger(FindJobSourcesJdbc.class);
	
	//private	HashSet jobRatingList = new HashSet();
	//private HashSet contendingJobIds = new HashSet();
	private String sqlQry = "";
	HashSet searchWordList = null;
	//private String searchWords = null;
	ArrayList userNames  = new ArrayList();


	public FindJobSourcesJdbc() {              
		super();
	}
	
	
	public Collection getUserNames() {         
		return(userNames);
	}
	
	
	public void processResults(ResultSet resultSet) throws ProcessException {
		try {
			log.debug("findSourceUserNames() - processing query results.");
			while (resultSet.next()) {
				String userName = resultSet.getString("s.user_name");
				userNames.add(userName);
			}
		}
		catch (java.sql.SQLException se) {
			log.error("findMatchingJobs() - exception walking results.", se);
		}
	}

	
	public String getQuery() {
		return(sqlQry);		
	}

}
